ROOT=..
PLATFORM=$(shell $(ROOT)/systype.sh)
include $(ROOT)/Make.defines.$(PLATFORM)

PROGS += threadid
PROGS += exitstatus
PROGS += badexit2
PROGS += cleanup
# PROGS += mutex1
# PROGS += mutex2 
# PROGS += mutex3
# PROGS += maketimeout
# PROGS += condvar


all: $(PROGS) 

$(PROGS): $(LIBAPUE)
# %: %.c $(LIBAPUE)
	$(CC) $(CFLAGS) -g $@.c -o $@ $(LDFLAGS) $(LDLIBS) -lpthread

clean:
	rm -rf $(PROGS) $(TEMPFILES) *hole 
	( cd $(ROOT)/lib/  &&  $(MAKE) clean )

include $(ROOT)/Make.libapue.inc 